// Copyright (C) Kumo inc. and its affiliates.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#pragma once

#include <turbo/flags/flag.h>
#include <turbo/flags/declare.h>


TURBO_DECLARE_FLAG(int32_t,
                   pollux_memory_num_shared_leaf_pools);

TURBO_DECLARE_FLAG(bool,
                   pollux_time_allocations);

// Used in common/base/PolluxException.cpp
TURBO_DECLARE_FLAG(bool,
                   pollux_exception_user_stacktrace_enabled);

TURBO_DECLARE_FLAG(bool,
                   pollux_exception_system_stacktrace_enabled);

TURBO_DECLARE_FLAG(int32_t,
                   pollux_exception_user_stacktrace_rate_limit_ms);

TURBO_DECLARE_FLAG(int32_t,
                   pollux_exception_system_stacktrace_rate_limit_ms);

// Used in common/base/ProcessBase.cpp

TURBO_DECLARE_FLAG(bool, avx2);

TURBO_DECLARE_FLAG(bool, bmi2);

// Used in exec/Expr.cpp

TURBO_DECLARE_FLAG(std::string,
                   pollux_save_input_on_expression_any_failure_path);

TURBO_DECLARE_FLAG(std::string,
                   pollux_save_input_on_expression_system_failure_path);

TURBO_DECLARE_FLAG(bool,
                   force_eval_simplified);

TURBO_DECLARE_FLAG(bool,
                   pollux_experimental_save_input_on_fatal_signal);

// TODO: deprecate this once all the memory leak issues have been fixed in
// existing meta internal use cases.
TURBO_DECLARE_FLAG(bool,
                   pollux_memory_leak_check_enabled);

TURBO_DECLARE_FLAG(bool,
                   pollux_memory_pool_debug_enabled);

// TODO: deprecate this after solves all the use cases that can cause
// significant performance regression by memory usage tracking.
TURBO_DECLARE_FLAG(bool,
                   pollux_enable_memory_usage_track_in_default_memory_pool);

TURBO_DECLARE_FLAG(bool,
                   pollux_suppress_memory_capacity_exceeding_error_message);

TURBO_DECLARE_FLAG(bool, pollux_memory_use_hugepages);

TURBO_DECLARE_FLAG(int32_t,
                   cache_prefetch_min_pct);

TURBO_DECLARE_FLAG(bool, pollux_ssd_odirect);

TURBO_DECLARE_FLAG(bool,
                   pollux_ssd_verify_write);

// Used in /connectors/tpch
TURBO_DECLARE_FLAG(int32_t,
                   pollux_tpch_text_pool_size_mb);
TURBO_DECLARE_FLAG(bool,
                   pollux_memory_pool_capacity_transfer_across_tasks);

TURBO_DECLARE_FLAG(std::string, profiler_tmp_dir);

TURBO_DECLARE_FLAG(int32_t,
                   profiler_check_interval_seconds);

TURBO_DECLARE_FLAG(int32_t,
                   profiler_min_cpu_pct);

TURBO_DECLARE_FLAG(int32_t,
                   profiler_min_sample_seconds);

TURBO_DECLARE_FLAG(int32_t,
                   profiler_max_sample_seconds);

TURBO_DECLARE_FLAG(std::string, profiler_perf_flags);

TURBO_DECLARE_FLAG(bool,
                   experimental_enable_legacy_cast);
TURBO_DECLARE_FLAG(bool, wsVRLoad);

